package cc.laop.controller.system;

import cc.laop.business.system.LogBusiness;
import cc.laop.entity.Page;
import cc.laop.entity.system.Log;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("admin/system/log")
public class LogController {

	@Autowired
	private LogBusiness logBusiness;

	@RequestMapping("list.do")
	@ResponseBody
	public Map<String, Object> list(Log log, Page page) {
		Map<String, Object> map = new HashMap<String, Object>();
		PageInfo<Log> pager = logBusiness.selectByPage(log, page);
		map.put("loglist", pager);
		return map;
	}
}
